package cn.hznc.repository;

import cn.hznc.domain.entity.InventoryLocationEntity;
import cn.hznc.domain.entity.SubProgramEntity;
import cn.hznc.domain.entity.ToolPartEntity;
import cn.hznc.domain.entity.WarehouseEntity;
import cn.hznc.domain.request.process.QryMachineToolReq;
import cn.hznc.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Author：Administrator
 * @Date：2023/4/12 10:34
 */
public interface WarehouseRespository{

    String getWarehouseType(@Param("id") Integer warehouseId);

    List<MachineToolVo> selectMachineToolList(QryMachineToolReq machineToolReq);

    List<EquipmentTaskVo> queryEquipmentTaskList(String warehouseName);

    String getNameByWarehouseId(@Param("warehouseId") Integer warehouseId);

    WarehouseEntity selectOperatorById(Integer machineToolId);

    List<String> getMachineToolNameList(@Param("type") String type);

    WarehouseEntity getByIdOrName(@Param("id") Integer id , @Param("name") String name);

    List<Map<String, Object>> selectWarehouseByType(@Param("warehouseType") String warehouseType ,@Param("toolNo") String toolNo);


    String selectNameById(@Param("id") Integer equipmentId);

    WarehouseEntity getById(@Param("id") Integer warehouseId);

    List<WarehouseEntity> getByIdReload(@Param("ids") List<Integer> ids);

    String getSnCodeById(@Param("id") Integer id);

    List<String> selectToolNoByBackUpStatus(@Param("id") Integer id);

    int countById(@Param("id") Integer id);

    int selectLength(@Param("id") Integer id);

    Integer selectLengthParam(@Param("id")Integer warehouseId);

    List<InventoryLocationEntity> selectLocationMax();

    List<WarehouseSnVo> selectWarehouseSnVo();

    Integer getIdByName(@Param("name") String name);

    List<ToolPartEntity> selectByBackUpStatus(@Param("id") Integer id,@Param("toolCode") String toolCode,@Param("subprogramName")String subprogramName);

    String getSnCodeByName(@Param("warehouseName") String warehouseName);

    String getNameBySnCode(@Param("snCode") String snCode);

    Integer selectWarehouseId(@Param("warehouseName") String warehouseName);

    void updateStatus(@Param("warehouseId") Integer warehouseId,@Param("status")  Integer status);

    List<LocationNumberVo> queryFirstStockByToolId(@Param("id") Integer id);

    void updateStatusByType(@Param("typeList") List<String> typeList, @Param("status") Integer code);

    List<Integer> selectByType(@Param("typeList")List<String> typeList);

    void insertBatch(@Param("insertList") List<WarehouseEntity> insertList);

    List<String> selectAll();

    List<WarehouseNameVo> selectAllReload();

    List<ToolPartEntity> selectByBackUpStatusReload(List<String> groupIds);
}
